<?php
/**
 * Created by PhpStorm.
 * User: tom_xia
 * Date: 2018/6/7
 * Time: 14:38
 * 原始视频混音
 */
require_once dirname(__DIR__)."/common.php";
use app\cls\tom\Lock;
use app\cls\tom\FFmpeg;
use app\lib\db\DbException;
use app\cls\tom\SysResource;
use app\cls\tom\Process;
use app\cls\tom\Tools;
use app\model\Video;

$process = new Process(__FILE__);
$process->setProcessNum(2);
$process->initProcess();
$process->isTryError = false;
$redis = SysResource::getRedis();
$db =  SysResource::getDB(true);
$ffmpeg = new FFmpeg();

$oriVideoUrl = "https://s-js.sports.cctv.com/host/video/2018/11/09/15417692384522.mp4";
$outPutPath = CDN_PATH."/tmp1/".pathinfo($oriVideoUrl,PATHINFO_BASENAME);
$oriVideoPath = str_replace(CDN_HOST,CDN_PATH,$oriVideoUrl);
$re = $ffmpeg->transCode1($oriVideoPath,$outPutPath);
var_dump($re);